import { connect } from "react-redux";
import actions from "../actions";
import { bindActionCreators } from "redux";

export default function (fn, name) {
  return connect(fn, (dispatch) => ({ ...bindActionCreators(actions[name], dispatch), dispatch }))
}
